package chapters.utils;

/**
 * Created by yangpengfei on 2016/8/16.
 */
public class FilePathUtils {
    public static String getBathPath() {
        String path = FilePathUtils.class.getResource("/").getPath();
        return path;
    }

    /**
     * 获取文件目录
     *
     * @return 如：D:/scm/oschina/logback/logback-examples/target/classes/chapters/
     */
    public static String getRuntimePath() {
        String path = FilePathUtils.class.getResource(".").getPath();
        return path;
    }

    public static void main(String[] args) {
        System.out.println(FilePathUtils.getRuntimePath());
    }
}
